#include "pch.hpp"
#include "vsstream.hpp"

using namespace logger;




vsstream::vsstream(boost::shared_ptr<const services::provider> p)
	: stream(p)
{}
///////////////////////////////////////////////////////////////////////////////////////////////////




stream &vsstream::operator<<(const entry& e)
{
	std::stringstream tmp;
	tmp << "[" << qPrintable(e.module) << "] " << entry::toString(e.lvl) << ": " << qPrintable(e.message) << " (" << qPrintable(e.file) << ", line " << e.line << ")" << std::endl;

	OutputDebugStringA(tmp.str().c_str());
	return *this;
}
///////////////////////////////////////////////////////////////////////////////////////////////////
